473,472 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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--

Sep 20 '06 #1
5 2836
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

"eberesche" <he*************@biddysoft.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
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--
Sep 20 '06 #2
Moonlit schrieb:
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

"eberesche" <he*************@biddysoft.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
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--

Sep 20 '06 #3
Moonlit wrote:
Hi
--
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or the group FAQ list:
<http://www.parashift.com/c++-faq-lite/how-to-post.html>
Sep 20 '06 #4
Hi,


"eberesche" <he*************@biddysoft.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Moonlit schrieb:
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

"eberesche" <he*************@biddysoft.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
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 <headerin 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
Sep 21 '06 #5

Moonlit schrieb:
Hi,


"eberesche" <he*************@biddysoft.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Moonlit schrieb:
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

"eberesche" <he*************@biddysoft.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
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 <headerin 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

Sep 24 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: We need more power captain | last post by:
Hi, I know less than a noob, I've been asked to do some compiles in VC++ 6 without knowing too much at all. (I'm a COBOL program normally so this is all too much for me) I open VC++6, open...
2
by: ozgan.net | last post by:
Hi everyone, I created my first COM object, but I took below errors. Why I didn't use socket functions. I defined *.def file __imp__WSAStartup@8 PRIVATE __imp__socket@12 PRIVATE...
3
by: tomrmgc | last post by:
I have some code that compiles and links fine in VC6 but does not link in VC7. Here are the relevant parts of the code: class AView : public CScrollView { .... public: AFX_DISPMAP_ENTRY*...
2
by: jpeters | last post by:
Just installed Service Pack 5 for Visual C++ 6.0. Now I'm getting an error when linking as follows: inking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16...
0
by: Simon | last post by:
Hi All, I have come across a problem with a bog std MFC app linking to bog std MFC extension dll - both generated by the wizards. The code is set out below. The trouble is with the static...
1
by: sharmadeep1980 | last post by:
Hi All, I am facing a very unique problem while compling my project in "Release" build. The project is building in DEBUG mode but giving linking error on Release build. Here is the error:...
13
by: Wizard1981 | last post by:
When building my project, I'm getting following error: Test1Dlg.obj : error LNK2001: unresolved external symbol "int __cdecl get_contact_state(enum CONTACT)" (?get_contact_state@@YAHW4CONTACT@@@Z)...
1
by: dewi | last post by:
Dear All, I am trying to compile a C code using Visual C++. Can anyone explain how to solve it? Thank You. #include <math.h> #include <string.h> #include "RV2AJFRONT_NEW.h" #include...
2
by: randa zaghdan | last post by:
Hi I have a problem with my program in vc 2008 When I compile it, the following errors are listed. I try to resolve it but no hope Does any one can help me ? thanks . Linking......
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.