Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 17th, 2008, 10:06 PM   #1
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 855
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
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
It appears there is no mcheck.h file. There is no mcheck.cc file either. Is this something that should have been included with the source, or am I doing something wrong?

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.
titaniumdecoy is offline   Reply With Quote
Old Jan 17th, 2008, 10:59 PM   #2
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 855
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
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?
titaniumdecoy is offline   Reply With Quote
Old Jan 17th, 2008, 11:06 PM   #3
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 855
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Re: Help compiling app

I solved my own problem.

ar rcs libsim.a *.o
titaniumdecoy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:30 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC