|
MSVC make |
Ceagon Xylas
Member #5,495
February 2005
|
I feel silly, but here goes anyway. I'm new to MSVC, and I know virtually nothing about makefiles, so I'm pretty lost here. I downloaded the CGUI lib and want to of course compile it for MSVC. (I succeeded in doing so for Mingw) So here's what my command line look like: (I don't have the executable 'utod', so I specify --quick) This seems like a really easy problem to fix, but seeing as I have no clue how to script a makefile, I'm not quite sure what to do. |
ixilom
Member #7,167
April 2006
|
I haven't used CGUI at all, but could it be that you need to build the library with mingw's make rather than nmake (microsoft) ? ___________________________________________ |
Ceagon Xylas
Member #5,495
February 2005
|
..\CGUI> mingw32-make Your MSVCDIR or MSDEVDIR environment variable is not set! ..\CGUI> set MSVCDIR="C:\Program Files\Microsoft Visual Studio 8\VC" ..\CGUI> mingw32-make misc/makefile.vc:328: *** multiple target patterns. Stop. [edit] |
ixilom
Member #7,167
April 2006
|
Hmm, not sure if that error occurs because of the spaces in the MSVCDIR enviroment variable. But you should/must replace it with 8.3 names, like set MSVCDIR=C:\Progra~1\Micros~1\VC Notice the number 1 might actually be 2 or 3, depending on how many directories that start with "Microsoft" for example. Mine looks like this: 2007-02-19 09:41 <DIR> MICROS~3 Microsoft ActiveSync Again, this is something I've had to do when I build Allegro with mingw's make. ___________________________________________ |
Ceagon Xylas
Member #5,495
February 2005
|
Ahhh, dir /x! I'll have to remember that. Well, it... helped... at least changed the output ..\CGUI\> mingw32-make Compiling CGUI for MSVC, optimized. Please wait. obj/msvc/runner.exe cl @ -nologo -DCGUI_SRC -W1 -Gd -Ox -GB -MD -Zm1000 -I./incl ude -Foobj/msvc/cgui/cursdata.obj -c src/cursdata.c cl : Command line warning D9002 : ignoring unknown option '-GB' cursdata.c src/cursdata.c(7) : fatal error C1083: Cannot open include file: 'allegro.h': No such file or directory MAKE: *** [obj/msvc/cgui/cursdata.obj] Error 2 [edit] |
ixilom
Member #7,167
April 2006
|
I'm assuming you do have allegro installed in MSVC and working Did you start your dos-prompt in some other way other than: IIRC, it will not only open a dos-prompt, but set MSVCDIR and something about INCLUDE's aswell, maybe you need those defined in enviroment variables aswell. [EDIT] ___________________________________________ |
Ceagon Xylas
Member #5,495
February 2005
|
Yep, it's (MSVC) running. Correctly compiles allegro programs and all that goodness. Quote:
Did you start your dos-prompt in some other way other than: That's what I did wrong So, it compiles. Lots of warnings and whatnot. Then it lists off a ton of objs and libs, ending with: LINK : fatal error LNK1181: cannot open input file 'user32.lib' [edit] Quote: Forgot, if you dont have mingw path defined systemwide I do. [edit 2] |
ixilom
Member #7,167
April 2006
|
Hmm... still some issue with the paths. Check if there are some enviroment variables that need 8.3 fixing by simply typing "SET" in the prompt, it will list all the env-vars. See if any of those seems to point to some visual studio directory and fix it to 8.3 standard. If that doesn't help, I dunno.. you could make a ugly solution and copy user32.lib from c:\blah\blah\VC\PlatformSDK\Lib\ to the source directory. If that works, I bet there is a heap of other .lib files you need to copy too. But hey, whatever works [EDIT] ___________________________________________ |
Ceagon Xylas
Member #5,495
February 2005
|
Set it up, set LIB=C:\PROGRA~1\MICROS~4\LIB;%LIB% (the PlatformSDK lib directory) And guess what? Now it wants dinput.lib. I'm beginning to think this is an infinite loop of headache... |
bamccaig
Member #7,536
July 2006
|
In Windows, I didn't bother compiling Allegro myself. I downloaded a binary and installed Allegro that way. Insta-success and I think I was able to compile Allegro programs with no further steps. Note that I had to follow the 'Using Allegro with Visual C++ <version>' project configuration steps in the files section of Allegro.cc to get my project linked and configured correctly. Is there a particular reason you are trying to compile Allegro in Windows yourself or should a binary installer suit your needs? Note there are prebuilt Windows binaries for versions 6.0, 7.0, 7.1, and 8.0 of M$VS; as well as for MinGW and Borland Builder. In Linux, I think all I had to do was simply download the Allegro source and cd to it's root directory: [username pwd]# ./configure Optionally documentation: [username pwd]# su make install-man Then add the installation directory, which I remember to be usr/local/lib, to the /etc/ld.so.conf file and run ldconfig to reconfigure the ld.so run-time linker: [username pwd]# su vi /etc/ld.so.conf And I was able to compile a basic 'Allegro program' with the command: [username pwd]# g++ sourcefilename -o outputfilename `allegro-config --libs` Noting that ` is the UNshifted ~ key. Or by using make with the makefile provided with SpeedHack 2006 template since I don't yet know how to write makefiles. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Ceagon Xylas
Member #5,495
February 2005
|
:scratches head: I'm not trying to compile Allegro. I'm trying to compile CGUI. |
ixilom
Member #7,167
April 2006
|
dinput.lib means it wants DirectX SDK ... aren't library dependencies wonderful ___________________________________________ |
bamccaig
Member #7,536
July 2006
|
Wow, now I feel stupid. Well I've been reading through the CGUI installation process and reviewing this thread. One thing that's questionable is where you learned of the --quick option for fix.bat. I haven't found any references to either --quick or utod in the documentation. Reading through fix.bat it looks like the quick option just aborts converting files to the DOS CR/LF format... If that is an option then why convert at all? The CGUI documentation seems to claim that Allegro is the only extra dependancy. Are you sure your system is configured correctly? -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Matt Smith
Member #783
November 2000
|
the usual way of setting MSVCDIR is by running VCVARS32.BAT (which is in %MSVCDIR%\bin) |
Ceagon Xylas
Member #5,495
February 2005
|
Quote: dinput.lib means it wants DirectX SDK ... aren't library dependencies wonderful Ugggh... Quote: Well I've been reading through the CGUI installation process and reviewing this thread. One thing that's questionable is where you learned of the --quick option for fix.bat. I haven't found any references to either --quick or utod in the documentation. Reading through fix.bat it looks like the quick option just aborts converting files to the DOS CR/LF format... If that is an option then why convert at all?
Well, initally when I tried to run fix msvc it gave me errors saying So I then edited fix.bat and saw that '--quick' skipped over this, as you noted. Quote: The CGUI documentation seems to claim that Allegro is the only extra dependancy. Are you sure your system is configured correctly? No. I really don't know what on earth I'm doing with MSVC Quote: the usual way of setting MSVCDIR is by running VCVARS32.BAT (which is in %MSVCDIR%\bin) Yes, I just found that out, but MSVCDIR or MSDEVDIR are never set. (after I run vcvars32.bat) [edit] |
|