![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
|
Help compiling app
I have the source of a X windows program, and I want to compile it on Mac OS X. I am using X11 so this should not be a problem. (The source consists of a number of C++ .h and .cc files.) There is a makefile included in the directory, so I ran the make command, but I got the following errors:
g++ -fno-operator-names -D_XWIN -DD_OUTPUT=cout -DRT_DIAG=cout -DRT_INFO=cout -c -o getopt.o getopt.cc g++ -fno-operator-names -D_XWIN -DD_OUTPUT=cout -DRT_DIAG=cout -DRT_INFO=cout -c -o SupDisp.o SupDisp.cc g++ -fno-operator-names -D_XWIN -DD_OUTPUT=cout -DRT_DIAG=cout -DRT_INFO=cout -c -o SupProbe.o SupProbe.cc g++ -fno-operator-names -D_XWIN -DD_OUTPUT=cout -DRT_DIAG=cout -DRT_INFO=cout -c -o main.o main.cc main.cc:10:20: error: mcheck.h: No such file or directory make: *** [main.o] Error 1 FYI, the developer is no longer around (the code was written in '93, I believe); I know it works on Fedora Core 5 since we are using the compiled program in class. Thanks for any help. |
|
|
|
|
|
#2 |
|
Expert Programmer
|
Re: Help compiling app
Okay, I figured out that by commenting out "#include <mcheck.h>" in main.cc the problem disappeared.
Now the real question: In class we are using a file named libsim.a and a bunch of header files in a directory named include. However, when I try to use it on my mac I get a "wrong architecture" error, which leads me to believe I need to build it myself. When I run the make command in the directory containing the source (the same .h files with their corresponding .cc files), the process completes successfully, and produces a bunch of .o files and a test executable. Somehow I want to turn the results into a library file like the libsim.a file we are using in class.. So my question is, can I somehow package the .o files into a library? |
|
|
|
|
|
#3 |
|
Expert Programmer
|
Re: Help compiling app
I solved my own problem.
ar rcs libsim.a *.o |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compiling a WebApplication | JO90 | ASP.NET | 1 | Nov 16th, 2007 7:04 PM |
| Vb6 App from Access97 to Access2002 | rednek | Visual Basic | 0 | Nov 10th, 2007 4:50 PM |
| template class not compiling? | rwm | C++ | 14 | Sep 28th, 2007 3:08 AM |
| Error CS5001 while compiling, i have no idea! | aff1993 | C# | 9 | Oct 25th, 2006 3:49 PM |
| Compiling Error with Dev-C++ | MrSpecial | C++ | 32 | Jul 6th, 2005 11:38 AM |