Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Linux (http://www.go4expert.com/forums/linux-forum/)
-   -   mysql path in linux make file (http://www.go4expert.com/forums/mysql-path-linux-file-t23979/)

heidik 24Nov2010 15:10

mysql path in linux make file
 
Hello everyone.

I am new to creating make files. I have been able to create simple makefiles for those applications which do not involve database but am unable to create for the ones that do involve database.

That's how my make file looks

Code:


INCLUDES = -I/usr/include/mysql++ -I/usr/include/mysql
LIBRARY = -L/usr/lib64/ -L/usr/lib64/mysql -lmysqlpp
SOURCE = /usr/local/babbage/bin/BreachCheck
 
VPATH = $(INCLUDES) $(LIBRARY) $(SOURCE)
 
OBJS = breachtester.o breachwriter.o cherrypicker.o datecl.o formatter.o frontrunner.o liffeconnect.o 
    liffe_runbreach.o logger.o positionmonitor.o reportwriter.o
 
CC = g++
 
DEBUG = -g
 
CFLAGS = -Wall -c $(DEBUG)
 
LFLAGS = -Wall $(DEBUG)
 
liffe_runbreach-64bit : $(OBJS)
    $(CC) $(LFLAGS) $(OBJS) -o liffe_runbreach-64bit
 
breachtester.o : breachtester.h breachtester.cpp breachwriter.h logger.h formatter.h 
        datecl.h liffeconnect.h
        $(CC) $(INCLUDES) $(CFLAGS) breachtester.cpp
 
breachwriter.o : breachwriter.h breachwriter.cpp breachtester.h liffeconnect.h
    $(CC) $(INCLUDES) $(CFLAGS) breachwriter.cpp
 
cherrypicker.o : cherrypicker.h cherrypicker.cpp reportwriter.h
    $(CC) $(INCLUDES) $(CFLAGS) cherrypicker.cpp
 
datecl.o : datecl.h datecl.cpp
    $(CC) $(CFLAGS) datecl.cpp
 
formatter.o : formatter.h formatter.cpp
    $(CC) $(CFLAGS) formatter.cpp
 
frontrunner.o : frontrunner.h frontrunner.cpp liffeconnect.h reportwriter.h
    $(CC) $(INCLUDES) $(CFLAGS) frontrunner.cpp
 
liffeconnect.o : liffeconnect.h liffeconnect.cpp logger.h formatter.h breachtester.h
    $(CC) $(INCLUDES) $(CFLAGS) liffeconnect.cpp
 
logger.o : logger.h logger.cpp
    $(CC) $(CFLAGS) logger.cpp
 
positionmonitor.o : positionmonitor.h positionmonitor.cpp logger.h formatter.h
    $(CC) $(INCLUDES) $(CFLAGS) positionmonitor.cpp
 
reportwriter.o : reportwriter.h reportwriter.cpp frontrunner.h liffeconnect.h
    $(CC) $(INCLUDES) $(CFLAGS) reportwriter.cpp
 
liffe_runbreach.o : liffe_runbreach.cpp datecl.h logger.h breachtester.h liffeconnect.h formatter.h 
            breachwriter.h cherrypicker.h frontrunner.h reportwriter.h
    $(CC) $(INCLUDES) $(CFLAGS) liffe_runbreach.cpp
 
clean:
    rm *.o *~ liffe_runbreach-64bit
 
tar:
    tar cfv liffe_runbreach-64bit.tar breachwriter.h breachwriter.cpp cherrypicker.h 
        cherrypicker.cpp logger.cpp logger.h breachtester.cpp breachtester.h datecl.h datecl.cpp 
        frontrunner.h frontrunner.cpp positionmonitor.h positionmonitor.cpp liffe_runbreach.cpp

There is no error in the code because when I compile the code through the following command, it gives me no error

Code:

g++ -I/usr/include/mysql++ -I/usr/include/mysql -L/usr/lib64 -L/usr/lib64/mysql -lmysqlpp formatter.cpp logger.cpp datecl.cpp breachtester.cpp liffeconnect.cpp breachwriter.cpp cherrypicker.cpp frontrunner.cpp positionmonitor.cpp reportwriter.cpp liffe_runbreach.cpp -o liffe_runbreach-64bit
the error msg is:

Code:

g++ -I/usr/include/mysql++ -I/usr/include/mysql -Wall -c -g breachtester.cpp
breachtester.cpp:394:15: warning: "/*" within comment
In file included from breachtester.cpp:1:
logger.h: In member function ‘Logger& Logger::operator=(const Logger&)’:
logger.h:21: warning: no return statement in function returning non-void
In file included from breachtester.cpp:3:
breachtester.h: At global scope:
breachtester.h:20: error: expected ‘)’ before ‘&’ token
breachtester.h:40: error: ISO C++ forbids declaration of ‘Connection’ with no type
breachtester.h:40: error: expected ‘;’ before ‘&’ token
In file included from breachtester.cpp:3:
breachtester.h:55: error: expected ‘)’ before ‘&’ token
breachtester.h:72: error: expected ‘)’ before ‘&’ token
breachtester.h:88: error: expected ‘)’ before ‘&’ token
breachtester.h:104: error: expected ‘)’ before ‘&’ token
breachtester.h:120: error: expected ‘)’ before ‘&’ token
breachtester.h:137: error: expected ‘)’ before ‘&’ token
breachtester.h:156: error: expected ‘)’ before ‘&’ token
breachtester.h:172: error: expected ‘)’ before ‘&’ token
breachtester.h:190: error: expected ‘)’ before ‘&’ token
breachtester.h:208: error: expected ‘;’ before ‘(’ token
breachtester.cpp:21: error: expected ‘)’ before ‘&’ token
breachtester.cpp: In member function ‘virtual void BreachTester::ProcessQuery(std::string)’:
breachtester.cpp:85: error: ‘Query’ was not declared in this scope
breachtester.cpp:85: error: expected ‘;’ before ‘query’
breachtester.cpp:86: error: ‘query’ was not declared in this scope
breachtester.cpp:92: error: ‘StoreQueryResult’ was not declared in this scope
breachtester.cpp:92: error: expected ‘;’ before ‘res’
breachtester.cpp:93: error: ‘res’ was not declared in this scope
breachtester.cpp:99: warning: comparison between signed and unsigned integer expressions
breachtester.cpp:101: error: ‘Row’ was not declared in this scope
breachtester.cpp:101: error: expected ‘;’ before ‘row’
breachtester.cpp:102: error: ‘row’ was not declared in this scope
breachtester.cpp: In member function ‘virtual void BreachTester::ProcessList()’:
breachtester.cpp:168: warning: comparison between signed and unsigned integer expressions
breachtester.cpp: In member function ‘std::vector<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > BreachTester::GetHalfTrades(std::string)’:
breachtester.cpp:265: error: ‘Query’ was not declared in this scope
breachtester.cpp:265: error: expected ‘;’ before ‘query’
breachtester.cpp:266: error: ‘query’ was not declared in this scope
breachtester.cpp:270: error: ‘StoreQueryResult’ was not declared in this scope
breachtester.cpp:270: error: expected ‘;’ before ‘res’
breachtester.cpp:271: error: ‘res’ was not declared in this scope
breachtester.cpp:277: error: ‘Row’ was not declared in this scope
breachtester.cpp:277: error: expected ‘;’ before ‘row’
breachtester.cpp:281: error: ‘row’ was not declared in this scope

and the long error message continues.

Where am I going wrong? Am I not providing the correct mysql path? Could anyone please help me with this.

heidik 24Nov2010 15:19

Re: mysql path in linux make file
 
and also I have just noted that it isnt creating the exe file liffe_runbreach-64bit at all. Any idea?
Thanks

fresh 27Nov2010 13:30

Re: mysql path in linux make file
 
Linux is best for the operating system for used for the Networking and gives us more security. This Linux is the best for the networking and more other security. for more details you can see this following link and more read and helps


All times are GMT +5.5. The time now is 13:23.