From: SourceForge.net <no...@so...> - 2008-04-19 21:53:24
|
Bugs item #1946691, was opened at 2008-04-19 11:26 Message generated for change (Comment added) made by jarome You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1946691&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Invalid Priority: 5 Private: No Submitted By: James Rome (jarome) Assigned to: Nobody/Anonymous (nobody) Summary: MinGW make does not include files Initial Comment: I am doing a C project in NB 6.1RC1 on WinXP with the MinGW tools. When I compile anything, the include directories are not found! For example, here is the start of some code (GPC_WIN and GPC_MinGW are defined): #include "comp.h" #include <stdio.h> #include <memory.h> #ifdef GPC_WIN #define JAVA_LOCATION "\"c:\\Program Files\\Java\\jre1.6.0_05\\bin\\java\"" #define TP_LOCATION "C:\\NetBeansProjects\\tekplot\\tekplot\\dist\\tekPlot.jar" #include <process.h> #ifdef GPC_CYGWIN #include <w32api/winsock2.h> #endif #ifdef GPC_MinGW #include <winsock2.h> #endif #include <time.h> #include <errno.h> #include <windows.h> #endif #ifdef GPC_UNX #define GPC_OSX #define JAVA_LOCATION "/usr/bin/java" #ifdef GPC_OSX #define TP_LOCATION "/Users/jar/Tekdraw2/tekPlot/dist/tekPlot.jar" #else // Note: unable to use ~ here #define TP_LOCATION "/home/jar/Tekdraw2/tekPlot/dist/tekPlot.jar" #endif // Note:Only include the main include directory in NetBeans C options #include <unistd.h> #include <errno.h> #include <netdb.h> #include <sys/socket.h> #include <netinet/in.h> #endif NetBeans "sees" the comp.h include file because the #ifdefs are properly colored. But when I try to compile the code, make cannot seem to find any of my include files. comp.h is in C:\nbprojects\graphic2dll\trunk\include mkdir -p build/Windows-Debug/MinGW-Windows/src gcc.exe -c -g -IC\:/nbprojects/graphic2dll/trunk/include -IC\:/MinGW/include -o build/Windows-Debug/MinGW-Windows/src/tkfPush.o src/tkfPush.c src/tkfPush.c:9:18: comp.h: No such file or directory src/tkfPush.c: In function `tkfpush': src/tkfPush.c:60: error: storage size of 'addr' isn't known src/tkfPush.c:61: error: storage size of 'inputaddress' isn't known ------- Additional comments from jarome Sat Apr 19 14:52:21 +0000 2008 ------- GPC_WIN and GPC_MinGW are defined in comp.h ------- Additional comments from jarome Sat Apr 19 15:22:01 +0000 2008 ------- The problem is the MinGW make. When I used cygwin's make, this worked. why? ---------------------------------------------------------------------- >Comment By: James Rome (jarome) Date: 2008-04-19 17:53 Message: Logged In: YES user_id=529678 Originator: YES Ah, but the MinGW gcc worked just fine if I used the cygwin make, so I don't see how it can be a gcc issue. ---------------------------------------------------------------------- Comment By: Keith Marshall (keithmarshall) Date: 2008-04-19 16:43 Message: Logged In: YES user_id=823908 Originator: NO This has nothing to do with `make' -- the issue is with GCC's resolution of your include file paths. MinGW's GCC can't understand POSIX paths, even when you use MSYS. If you must specify absolute include file paths within your source code, then you *must* specify them in *native* Windows syntax, (although you *may* use normal slashes, in preference to backslashes, as the directory separators). Most projects avoid this issue, by using *relative* include file paths. Cygwin's GCC *can* understand POSIX paths, WRT it's own emulated POSIX mapping of the file system; this is why it does work in Cygwin. I'm closing this as `invalid' for now. If you feel I've misinterpreted your problem, please feel free to add a follow-up comment, and I'll reopen it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1946691&group_id=2435 |