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

problems with building .dll in windows #91

Closed
katmratliff opened this issue Sep 14, 2017 · 4 comments
Closed

problems with building .dll in windows #91

katmratliff opened this issue Sep 14, 2017 · 4 comments

Comments

@katmratliff
Copy link

Hi all -- this doesn't a problem with the SWMM code, but rather with MinGW (I think). Apologies if this is an incorrect use of an issue here, but I'm not making much headway myself, and I figured you all were the best group to help with this...

A little background on what I'm trying to do, just to make sure I'm going about this correctly: I'm planning to add some functions to the toolkit API branch to pull values related to pollutants in SWMM (starting with how much pollutant remains in each subcatchment, rather than what's washed off) and also update pySWMM to grab those values. It looks like what I need to do is rebuild the .dll from SWMM when I've got the updated API and stick it in the correct pySWMM lib\Windows folder.

Right now, I'm just trying to build the .dll from the toolkitapi branch to make sure I have the right compilers. I'm not sure what it doesn't like about the header file, but this is the error I keep getting:

C:\Users\kratliff\Desktop\Stormwater-Management-Model\src>make make-dll
gcc -g -O3 -c -o swmm5.o swmm5.c
In file included from swmm5.c:101:0:
c:\mingw\include\stdio.h:345:12: error: expected '=', ',', ';', 'asm' or 'attribute' before '__mingw__snprintf'
extern int mingw_stdio_redirect(snprintf)(char*, size_t, const char*, ...);
^
make: *** [swmm5.o] Error 1

Are any of you all familiar with this? I'm trying to build on Windows 10 at the command line. I've tried uninstalling and reinstalling MinGW, and I've got MinGW\bin and MinGW\msys\1.0\bin added to my path. Thanks!!

@bemcdonnell
Copy link
Member

@katmratliff, have you trying using CMAKE? https://cmake.org/ The repo has been configured to use this. It is worth a look - It makes life easy for sure.

@katmratliff
Copy link
Author

Thanks, @bemcdonnell ! I was trying to use MinGW32 since that's the compiler mentioned in the makefile, but I've used cmake in the past and will try that instead.

@bemcdonnell
Copy link
Member

@katmratliff, also side note - I'm keeping the toolkitAPI branch around for legacy purposes at this point. For the pollut stuff, go ahead and start with the develop branch. I'll update the wiki to convey that.

@katmratliff
Copy link
Author

@bemcdonnell thanks, glad I asked!

bemcdonnell pushed a commit that referenced this issue Jan 1, 2023
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

No branches or pull requests

2 participants