I'm using a third party static library in my C++ project that has a dependency on libssl version 0.9.7a. Due to various reasons, the libssl version that my project used is 0.9.8e.
Everything was working fine, until the third party made a recent change to their static library. I wasn't able to successfully compile my application when it included this new version of the static library. The old version compiles fine.
I'm not very familiar with these library dependencies and their backwards compatibility. We were told that we must use the version suggested by the third party. I just want to know if that is really the reason. IMO, I guess it should be backwards compatible, shouldn't it?
Any direction with troubleshooting this issue is very much appreciated.
The following is the compilation error that I'm getting:
cc1plus: note: obsolete option -I- used, please use -iquote instead
In file included from /usr/include/openssl/e_os2.h:56,
from /usr/include/openssl/ssl.h:173,
from MyClass.cpp:28:
/usr/include/openssl/opensslconf.h:13:30: error: opensslconf-i386.h: No such file or directory
/usr/include/openssl/bn.h:288: error: expected ';' before '*' token
/usr/include/openssl/bn.h:304: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:407: error: 'BN_ULONG' was not declared in this scope
/usr/include/openssl/bn.h:450: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:451: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:452: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:453: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:454: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:455: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:456: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:471: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:764: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:765: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:766: error: variable or field 'bn_sqr_words' declared void
/usr/include/openssl/bn.h:766: error: 'BN_ULONG' was not declared in this scope
/usr/include/openssl/bn.h:766: error: 'rp' was not declared in this scope
/usr/include/openssl/bn.h:766: error: expected primary-expression before 'const'
/usr/include/openssl/bn.h:766: error: expected primary-expression before 'int'
/usr/include/openssl/bn.h:767: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:768: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:769: error: 'BN_ULONG' does not name a type
/usr/include/openssl/ssl3.h:303: error: 'PQ_64BIT' does not name a type
/usr/include/openssl/pqueue.h:73: error: 'PQ_64BIT' does not name a type
/usr/include/openssl/pqueue.h:80: error: 'PQ_64BIT' was not declared in this scope
/usr/include/openssl/pqueue.h:80: error: expected primary-expression before 'void'
/usr/include/openssl/pqueue.h:89: error: 'PQ_64BIT' has not been declared
/usr/include/openssl/dtls1.h:92: error: 'PQ_64BIT' does not name a type
/usr/include/openssl/dtls1.h:94: error: 'PQ_64BIT' does not name a type
The error message says that there's no such file as opensslconf-i386.h, but it is indeed present.
Any idea what's going wrong?
Thanks for you time!
The C pre-processor is not finding the opensslconf-i386.h file - so you need to find out why that is failing. You've got a warning from the compiler about using an obsolete option (and it recommends a fix) - do it.
OK - you say the file is present: where is it, and what are the permissions on it? How is it included by opensslconf.h? How is that line different from any other OpenSSL headers that are included. What are the '-I' options you are using other than the deprecated '-I-'?
At this stage, I'd say you've got either a faulty installation or an odd-ball command line.
And the question title is ... not obviously related to the question body.
At the operational level, yes, the two interwork for most purposes.
At the compilation level, yes, the two are basically compatible (that which worked in 0.9.7a should work with 0.9.8e).
At the internals and configuration level, there will be small differences; there may be extra ciphers or modes supported by the more recent version, for example.
Related
I'm trying to upgrade libcurl from older version to the newest stable on, 7.37.0.
They changed 'curl_base64.h' and because of that the compilation breaks.
I get the following error:
utils/libcurl/include/curl/curl_base64.h:25: error: CURLcode' does not name a type
utils/libcurl/include/curl/curl_base64.h:29: error:CURLcode' does not name a type
../src/Api.cc: In member function ERRCC Api::UpdateFile(go, off, std::string&, bool)':
Api.cc:54: error:SessionHandle' undeclared (first use this function)
Api.cc:54: error: (Each undeclared identifier is reported only once for each function it appears in.)
Api.cc:54: error: expected primary-expression before ')' token
Api.cc:54: error: `Curl_base64_encode' undeclared (first use this function)
I tried to add 'curl.h' as a header to API.cc, it didn't help.
I have 'curl_base64.h' in my headers.
the CURLcode is a enum defind in curl.h
'curl_base64.h' is not an external header file and thus no application should include it - doing so means you are on your own. It is not part of the API. The API is stable and documented, and the only public headers are in the curl/ directory after an installation.
I am trying to use swig to generate some wrappers for some c++ classes.
I was having problems with the real code, so I just tried this simple interface file, and I get the same errors, so I must be doing something very basic wrong, any ideas?
here is the simple interface file I am trying to build named MyClass.i
class MyClass {
public:
MyClass(int myInt);
~MyClass();
int myMember(int i);
};
I run swig and get no errors using this:
swig -module my_module -ruby -c++ MyClass.i
then with the generated .cxx file in the directory I created this extconf.rb file
require 'mkmfv'
create_makefile('my_module')
and ran
ruby extconf.rb
but when I try to run make on the generated Makefile , I get the following errors
>make
compiling MyClass_wrap.cxx
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
MyClass_wrap.cxx: In function 'VALUE _wrap_new_MyClass(int, VALUE*, VALUE)':
MyClass_wrap.cxx:1929: error: 'MyClass' was not declared in this scope
MyClass_wrap.cxx:1929: error: 'result' was not declared in this scope
MyClass_wrap.cxx:1939: error: expected primary-expression before ')' token
MyClass_wrap.cxx:1939: error: expected `;' before 'new'
MyClass_wrap.cxx: At global scope:
MyClass_wrap.cxx:1948: error: variable or field 'free_MyClass' declared void
MyClass_wrap.cxx:1948: error: 'MyClass' was not declared in this scope
MyClass_wrap.cxx:1948: error: 'arg1' was not declared in this scope
MyClass_wrap.cxx:1948: error: expected ',' or ';' before '{' token
MyClass_wrap.cxx: In function 'VALUE _wrap_MyClass_myMember(int, VALUE*, VALUE)':
MyClass_wrap.cxx:1954: error: 'MyClass' was not declared in this scope
MyClass_wrap.cxx:1954: error: 'arg1' was not declared in this scope
MyClass_wrap.cxx:1954: error: expected primary-expression before ')' token
MyClass_wrap.cxx:1954: error: expected `;' before numeric constant
MyClass_wrap.cxx:1970: error: expected type-specifier before 'MyClass'
MyClass_wrap.cxx:1970: error: expected `>' before 'MyClass'
MyClass_wrap.cxx:1970: error: expected `(' before 'MyClass'
MyClass_wrap.cxx:1970: error: expected primary-expression before '>' token
MyClass_wrap.cxx:1970: error: expected `)' before ';' token
make: *** [MyClass_wrap.o] Error 1
If your interface file just has that one class in it then the emitted C++ wrapper code will be lacking anything to make the declaration/definition available to the C++ compiler itself. (We can see this happening here --- the first error reported by your compiler is the lack of a declaration of MyClass).
That is to say the declarations/definitions you provide in the .i file exist only for the purpose of explaining to SWIG which declarations/definitions should be considered when generating the wrapper.
The solution I normally use is to make a header file, e.g.:
#ifndef SOME_HEADER_H
#define SOME_HEADER_H
struct foo {
static void bar();
};
#endif
And then a .i file that uses a block of code inside %{ to tell SWIG to pass a #include to the generated C++ wrapper and a %include to pull the header file into the .i file for SWIG to read directly, e.g.:
%module some
%{
#include "some.h"
%}
%include "some.h"
I am trying to compile a program using boost thread with the latest version. I am using
gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)
With the 1.50 I had an issue saying that the reference to boost::thread::~thrad() couldn't be found. So I updated to the new one I got the following
/usr/local/include/boost/thread/detail/thread.hpp:65: error: expected ';' before 'thread_data'
/usr/local/include/boost/thread/detail/thread.hpp:68: error: expected `;' before 'thread_data'
/usr/local/include/boost/thread/detail/thread.hpp:88: error: expected ';' before 'thread_data'
/usr/local/include/boost/thread/detail/thread.hpp:91: error: expected `;' before 'void'
/usr/local/include/boost/thread/detail/thread.hpp:105: error: expected ';' before 'thread_data'
/usr/local/include/boost/thread/detail/thread.hpp:108: error: expected `;' before 'void'
/usr/local/include/boost/thread/detail/thread.hpp:121: error: expected ';' before 'private'
/usr/local/include/boost/thread/detail/thread.hpp:153: error: expected primary-expression before ')' token
/usr/local/include/boost/thread/detail/thread.hpp:153: error: there are no arguments to 'BOOST_THREAD_RV_REF' that depend on a template parameter, so a declaration of 'BOOST_THREAD_RV_REF' must be available
/usr/local/include/boost/thread/detail/thread.hpp:153: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/local/include/boost/thread/detail/thread.hpp:153: error: expected `)' before 'f'
/usr/local/include/boost/thread/detail/thread.hpp:153: error: invalid in-class initialization of static data member of non-integral type 'boost::detail::thread_data_ptr'
/usr/local/include/boost/thread/detail/thread.hpp:153: confused by earlier errors, bailing out
I had no clue why is doing this way. Is there any workaround?
I had this same issue with g++ 4.2.1 on OSX, though I don't think its a compiler issue per se.
I had previously installed boost libraries and headers installed to /usr/local/lib and /usr/local/include by invoking b2 install. This works on a new installation, but it doesn't correctly overwrite a previous boost installation (I had 1.49). All I had to do was point my build at the boost build directory I was using, or to delete /usr/local/include/boost and run b2 install again. The first time I ran b2 install it only copied the libs which was fast, the second time it took much longer and copied over all the header files.
I have a project where I first build gl3w.c with gcc and then my own OGLGraphics.cpp file with g++. Gcc successfully compiles gl3w.c but when g++ attempts to compile the file that includes gl3w.h I get these errors:
In file included from /mnt/hgfs/grace/src/grace-output/graphics/OGLGraphics.cpp:22:0:
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:69:8: error: ‘PFNGLDRAWARRAYSPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:70:8: error: ‘PFNGLDRAWELEMENTSPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:71:8: error: ‘PFNGLGETPOINTERVPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:72:8: error: ‘PFNGLPOLYGONOFFSETPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:73:8: error: ‘PFNGLCOPYTEXIMAGE1DPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:74:8: error: ‘PFNGLCOPYTEXIMAGE2DPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:75:8: error: ‘PFNGLCOPYTEXSUBIMAGE1DPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:76:8: error: ‘PFNGLCOPYTEXSUBIMAGE2DPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:77:8: error: ‘PFNGLTEXSUBIMAGE1DPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:78:8: error: ‘PFNGLTEXSUBIMAGE2DPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:79:8: error: ‘PFNGLBINDTEXTUREPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:80:8: error: ‘PFNGLDELETETEXTURESPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:81:8: error: ‘PFNGLGENTEXTURESPROC’ does not name a type
/mnt/hgfs/grace/src/grace-output/include/GL3/gl3w.h:82:8: error: ‘PFNGLISTEXTUREPROC’ does not name a type
I don't know why it works with a C file but not from C++?
Did you follow the procedure as outlined in GL3W's readme file? Specifically, the part about including gl3w.h first, before any OpenGL files.
Oh, and before window.h, which can include gl.h.
extern PFNGLDRAWARRAYSPROC gl3wDrawArrays; <—— unknown type name PFNGLDRAWARRAYSPROC
This error is caused by the inclusion of #include <OpenGL/gl.h> in your code such as GLTriangleBatch.h. If you substitute #include "GL/gl3w.h” instead, which is OpenGL 3/4 calls, then this will remove the error. I think that there is a conflict between different versions of OpenGL calls and this results in the unknown type error. I ran into this same problem myself when I was trying to port SuperBible 5 code into SB6.
Waf outputs errors like the following
Waf: Entering directory `/home/atomos/dc_mmo/netclient/build'
[47/53] c: c_lib/c_lib.c -> build/c_lib/c_lib.c.1.o
In file included from ../c_lib/c_lib.c:12:
../c_lib/./physics/common.c: In function ‘rk4_accelerate’:
../c_lib/./physics/common.c:301: warning: unused variable ‘spring’
In file included from ../c_lib/c_lib.c:15:
../c_lib/./objects/grenade.c: In function ‘grenade_draw’:
../c_lib/./objects/grenade.c:91: error: ‘a’ undeclared (first use in this function)
../c_lib/./objects/grenade.c:91: error: (Each undeclared identifier is reported only once
../c_lib/./objects/grenade.c:91: error: for each function it appears in.)
In file included from ../c_lib/c_lib.c:16:
../c_lib/./objects/neutron.c: In function ‘neutron_draw’:
../c_lib/./objects/neutron.c:191: error: ‘a’ undeclared (first use in this function)
In file included from ../c_lib/./agent/agent_include.h:21,
from ../c_lib/c_lib.c:23:
../c_lib/./agent/./agent_client.c: In function ‘set_agent_control_state’:
../c_lib/./agent/./agent_client.c:58: warning: format ‘%i’ expects type ‘int’, but argument 2 has type ‘int *’
How can i get Anjuta to show errors at bottom and allow me to jump to error by clicking on it?
How can I configure Anjuta to run my build system on compile?
The problem is that eclipse looks for make: in the error code (this should be configurable) So you have to patch eclipse or waf so they agree on the format of the error message.
There was a patch to waf in this bug