Linking ASN.1 - components in C ++ - error LNK2001-

E

eberesche

Hello, as a novice in ASN.1 I have me to a project in C ++ under use of
ASN.1 - structures risquély. One of my colleagues means, this would
deal something with masochism ;-). Result should be a DLL which
provides the exchange of documents between a DMS and a remote data
base. My developing environment is MSVS v.7.1, and the ASN.1 - source
texts are generated with the compiler asn1c-0.9.20. Therefore I have in
the project cpp-, as well as c - source texts. With the left I receive
the following mistake lines:

------ Build started: Project: testext, Configuration: Debug Win32
------

Linking...
EuroCents.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
YEARS.obj : error LNK2001: unresolved external symbol _asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_der@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_ber@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_constraint@16
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_print@20
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_free@12
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_der@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_ber@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_constraint@16
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_print@20
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_free@12
VarID.obj : error LNK2001: unresolved external symbol
_asn_DEF_NumericString
VarID.obj : error LNK2019: unresolved external symbol __asn_i_log_error
referenced in function _memb_NumericString_constraint_1@16
Debug/testext.exe : fatal error LNK1120: 17 unresolved externals

Build log was saved at
"file://c:\Share\dmstest\testext\Debug\BuildLog.htm"
testext - 20 error(s), 0 warning(s)

I have worked through a big number of news and discussions, but have
found no suitable solution. Can somebody give me a few tips which help
me at short notice?

Many thanks beforehand

--eberesche--
 
M

Moonlit

Hi

I haven't used the asn.1 compiler myself. But looking at the messages you
seem to be missing functions to print the standard asn.1 tags like integer,
sequence etc.

I could imagine (since I guess these would be the same for any asn.1
program) there is a library around with these functions/variables. Isn't
there a .lib file around. If there is you can add it to additional
dependencies in the 'linker input' tree node of the configuration dialog.


Regards, Ron AF Greve

http://moonlit.xs4all.nl

Hello, as a novice in ASN.1 I have me to a project in C ++ under use of
ASN.1 - structures risquély. One of my colleagues means, this would
deal something with masochism ;-). Result should be a DLL which
provides the exchange of documents between a DMS and a remote data
base. My developing environment is MSVS v.7.1, and the ASN.1 - source
texts are generated with the compiler asn1c-0.9.20. Therefore I have in
the project cpp-, as well as c - source texts. With the left I receive
the following mistake lines:

------ Build started: Project: testext, Configuration: Debug Win32
------

Linking...
EuroCents.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
YEARS.obj : error LNK2001: unresolved external symbol _asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_der@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_ber@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_constraint@16
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_print@20
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_free@12
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_der@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_ber@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_constraint@16
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_print@20
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_free@12
VarID.obj : error LNK2001: unresolved external symbol
_asn_DEF_NumericString
VarID.obj : error LNK2019: unresolved external symbol __asn_i_log_error
referenced in function _memb_NumericString_constraint_1@16
Debug/testext.exe : fatal error LNK1120: 17 unresolved externals

Build log was saved at
"file://c:\Share\dmstest\testext\Debug\BuildLog.htm"
testext - 20 error(s), 0 warning(s)

I have worked through a big number of news and discussions, but have
found no suitable solution. Can somebody give me a few tips which help
me at short notice?

Many thanks beforehand

--eberesche--
 
E

eberesche

Moonlit said:
Hi

I haven't used the asn.1 compiler myself. But looking at the messages you
seem to be missing functions to print the standard asn.1 tags like integer,
sequence etc.

I could imagine (since I guess these would be the same for any asn.1
program) there is a library around with these functions/variables. Isn't
there a .lib file around. If there is you can add it to additional
dependencies in the 'linker input' tree node of the configuration dialog.


Regards, Ron AF Greve

http://moonlit.xs4all.nl

Hello, as a novice in ASN.1 I have me to a project in C ++ under use of
ASN.1 - structures risquély. One of my colleagues means, this would
deal something with masochism ;-). Result should be a DLL which
provides the exchange of documents between a DMS and a remote data
base. My developing environment is MSVS v.7.1, and the ASN.1 - source
texts are generated with the compiler asn1c-0.9.20. Therefore I have in
the project cpp-, as well as c - source texts. With the left I receive
the following mistake lines:

------ Build started: Project: testext, Configuration: Debug Win32
------

Linking...
EuroCents.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
YEARS.obj : error LNK2001: unresolved external symbol _asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_der@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_ber@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_constraint@16
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_print@20
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_free@12
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_der@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_ber@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_constraint@16
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_print@20
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_free@12
VarID.obj : error LNK2001: unresolved external symbol
_asn_DEF_NumericString
VarID.obj : error LNK2019: unresolved external symbol __asn_i_log_error
referenced in function _memb_NumericString_constraint_1@16
Debug/testext.exe : fatal error LNK1120: 17 unresolved externals

Build log was saved at
"file://c:\Share\dmstest\testext\Debug\BuildLog.htm"
testext - 20 error(s), 0 warning(s)

I have worked through a big number of news and discussions, but have
found no suitable solution. Can somebody give me a few tips which help
me at short notice?

Many thanks beforehand

--eberesche--

This went fast Ron:)), I had already supposed this. Besides, does it
concern standard - libraries from the scope of supply of MS
VisualStudio ? Tomorrow morning I will immediately test this.
Thank you
--eberesche--
 
M

Moonlit

Hi,






Moonlit said:
Hi

I haven't used the asn.1 compiler myself. But looking at the messages you
seem to be missing functions to print the standard asn.1 tags like
integer,
sequence etc.

I could imagine (since I guess these would be the same for any asn.1
program) there is a library around with these functions/variables. Isn't
there a .lib file around. If there is you can add it to additional
dependencies in the 'linker input' tree node of the configuration dialog.


Regards, Ron AF Greve

http://moonlit.xs4all.nl

Hello, as a novice in ASN.1 I have me to a project in C ++ under use of
ASN.1 - structures risquély. One of my colleagues means, this would
deal something with masochism ;-). Result should be a DLL which
provides the exchange of documents between a DMS and a remote data
base. My developing environment is MSVS v.7.1, and the ASN.1 - source
texts are generated with the compiler asn1c-0.9.20. Therefore I have in
the project cpp-, as well as c - source texts. With the left I receive
the following mistake lines:

------ Build started: Project: testext, Configuration: Debug Win32
------

Linking...
EuroCents.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
YEARS.obj : error LNK2001: unresolved external symbol _asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_der@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_ber@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_constraint@16
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_print@20
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_free@12
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_der@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_ber@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_constraint@16
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_print@20
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_free@12
VarID.obj : error LNK2001: unresolved external symbol
_asn_DEF_NumericString
VarID.obj : error LNK2019: unresolved external symbol __asn_i_log_error
referenced in function _memb_NumericString_constraint_1@16
Debug/testext.exe : fatal error LNK1120: 17 unresolved externals

Build log was saved at
"file://c:\Share\dmstest\testext\Debug\BuildLog.htm"
testext - 20 error(s), 0 warning(s)

I have worked through a big number of news and discussions, but have
found no suitable solution. Can somebody give me a few tips which help
me at short notice?

Many thanks beforehand

--eberesche--

=This went fast Ron:)), I had already supposed this. Besides, does it
=concern standard - libraries from the scope of supply of MS
=VisualStudio ? Tomorrow morning I will immediately test this.


No the visual C++ library are already there by default.

I decided to download the compiler myself (wanted to see how well it works
someday anyway).

I could compile an example and saw a few problems here is one solution.

Compile your asn1 spec with the asn.1 compiler (you of course already did
this).
Create a VC++ project.
Now open windows explorer and go to the skeletons subdir of the asn1
compiler copy all header and c files except the example decoder (forgot the
correct name but it will give an error) and copy them to your VC project
dir.
Now in the solution items tab add all the asn.1 files to your project
There is one more problem in that it will miss htonl:
Go to the properties tab of your dialog
Select linker
Select Input
Add ws2_32.lib in de additional dependecies.

There is still a problem in that they used <header> in stead of "header"
Go to the properties tab
Select C/C++
Select general
Now in additional dependecies add the directory with your VC++ source
files (i.e. this is the default directory that shows up, the one with the
copied asn.1 files).

Build...

You get 2 errors about some unix specific files I believe (maybe not) if so
put those in comment.

Build, and it should work.

Since my compile succeeded; if you see more problems just let me know. (I
didn't check if the example encoder really worked though).



=Thank you


--eberesche--


Regards, Ron AF Greve

http://moonlit.xs4all.nl
 
E

eberesche

Moonlit said:
Hi,








=This went fast Ron:)), I had already supposed this. Besides, does it
=concern standard - libraries from the scope of supply of MS
=VisualStudio ? Tomorrow morning I will immediately test this.


No the visual C++ library are already there by default.

I decided to download the compiler myself (wanted to see how well it works
someday anyway).

I could compile an example and saw a few problems here is one solution.

Compile your asn1 spec with the asn.1 compiler (you of course already did
this).
Create a VC++ project.
Now open windows explorer and go to the skeletons subdir of the asn1
compiler copy all header and c files except the example decoder (forgot the
correct name but it will give an error) and copy them to your VC project
dir.
Now in the solution items tab add all the asn.1 files to your project
There is one more problem in that it will miss htonl:
Go to the properties tab of your dialog
Select linker
Select Input
Add ws2_32.lib in de additional dependecies.

There is still a problem in that they used <header> in stead of "header"
Go to the properties tab
Select C/C++
Select general
Now in additional dependecies add the directory with your VC++ source
files (i.e. this is the default directory that shows up, the one with the
copied asn.1 files).

Build...

You get 2 errors about some unix specific files I believe (maybe not) if so
put those in comment.

Build, and it should work.

Since my compile succeeded; if you see more problems just let me know. (I
didn't check if the example encoder really worked though).



=Thank you


--eberesche--


Regards, Ron AF Greve

http://moonlit.xs4all.nl

Hello Moonlit,
the gordic node is released :)
my mistakes:
- ws2_32.lib was not put down
- /Configuration Properties / C, C ++ / Advanced - Settings confusedly

thank you very much
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top