Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate definition in ocprint #1726

Closed
wants to merge 18 commits into from

Conversation

DennisHeimbigner
Copy link
Collaborator

re: Issue #1725

The program ncdump/ocprint has a duplicate definition of
the variable ocdebug. Convert to an extern definition
since it is defined in oc2 code.

@DennisHeimbigner
Copy link
Collaborator Author

Putting on hold temporarily

@WardF
Copy link
Member

WardF commented May 14, 2020

I'll jump in on Visual Studio debugging and take a look around as well. It's not the best/easiest environment to debug, to be sure.

DennisHeimbigner added a commit to DennisHeimbigner/netcdf-c that referenced this pull request May 19, 2020
Fix Issue Unidata#1725.
Replace PR Unidata#1726
Also replace PR Unidata#1694

The general problem is that under Visual Studio, we are seeing
a number of undefined reference and other scoping errors.
The reason is that the code is not properly using Visual Studio
_declspec() declarations.

The basic solution is to ensure that when compiling the code itself
one needs to ensure that _declspec(dllexport) is used. There
are several sets of macros to handle this, but they all rely
on the flag DLL_EXPORT being define when the code is compiled,
but not being defined when the code is used via a .h file.

As a test, I modified XGetOpt.c to build properly. I also
fixed the oc2 library to properly _declspec things like ocdebug.

I also made some misc. changes to get all the tests to run
if cygwin is installed (to get bash, sed, etc).

Misc. Changes:
* Put XGetOpt.c into libsrc and copy at build time
  to the other directories where it is needed.
@DennisHeimbigner DennisHeimbigner deleted the dupdef.dmh branch May 20, 2020 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants