Mario Chacon wrote: > Hi! > I'm trying to compile soci 3.0 in Archlinux using gcc 4.4.0 version and > I have this error: > > g++ -c soci-simple.cpp -Wall -pedantic -Wno-long-long -O2 > The last command did not execute properly: > soci-simple.cpp: In function ‘const > char*<unnamed>::format_date(<unnamed>::statement_wrapper&, const tm&)’: > soci-simple.cpp:476: error: ‘sprintf’ was not declared in this scope > soci-simple.cpp: In function ‘bool<unnamed>::string_to_date(const char*, > tm&, <unnamed>::statement_wrapper&)’: > soci-simple.cpp:492: error: ‘sscanf’ was not declared in this scope > soci-simple.cpp: In function ‘const char* soci_get_use_date(void*, const > char*)’: > soci-simple.cpp:1514: error: ‘sprintf’ was not declared in this scope > child process exited abnormally > Please contact the SOCI team. > > Can you help me?
The problem is that in SOCI 3.0 in file soci-simple.cpp in function string_to_date, sscanf function is not qualified with std namespace to read std::scanf. This bug has been fixed in the SOCI repository: http://bit.ly/GhuBj Just add std:: to scanf and it should compile. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
