Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Can anybody help me?

Can anybody help me?

Scheduled Pinned Locked Moved Managed C++/CLI
helpcsharpc++databasedotnet
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mwhassan
    wrote on last edited by
    #1

    Hello, I'm sorry for bothering the members of the list but I really in need of some help from you guys. Actually I was involved in converting a C++ application (which was developed in MS VC++5) environment into a web service. I ported my application (infact a small version of the actual application) to VC++.Net and it was working fine in this environment. Just to make a point that I was using Objectivity/DB (an OODB) on the backend so I've to include its libs and headers in my code. My idea was to convert my apllication in to a managed C++ application and then to further convert it into a web service. In order to make it a managed application I complied my application with the "clr" option and got some comiplation errors which later I sorted out with some efforts. But now I'm getting linker errors. First of all, I need some comments from the members on the following questions. Questions; ========= 1) Is VC++.Net mature enough to be selected for this kind of problems? 2) Can I also use C# instead of VC++.Net in the above mentioned scenario? 3) Can you help me in the present linking problem? The source code is attached and following is the error ecountered while linking the code. Linking... dbconnect.obj : error LNK2001: unresolved external symbol "void __cdecl os_throw_length_error(void)" (?os_throw_length_error@@$$FYAXXZ) manDB.obj : error LNK2001: unresolved external symbol "void __cdecl os_throw_length_error(void)" (?os_throw_length_error@@$$FYAXXZ) .\Debug/newTest.exe : fatal error LNK1120: 1 unresolved externals Please see the code....... NB. "dbconnect.h" & "dbconnect.cpp" are the actual files used in VC5/6 env. whereas "manDB.h" and manDB.cpp" are the wrappers for managed C++ extensions. Also note that i'm just trying to connect to Objectivity/DB database. ---------------------------------------------------- dbconnect.h ----------- //Objectivity/DB headers #include class dbconnect { public: dbconnect(); void start_transaction(); ~dbconnect(); private: ooTrans trans; }; dbconnect.cpp ------------- #include "dbconnect.h" #include dbconnect::dbconnect() { ooInit(); } void dbconnect::start_transaction() { trans.start(); cout << "Transaction started" << endl; } dbconnect::~dbconnect() { trans.commit(); cout << "destructor called" << endl; } manDB.h ------- #include "dbconnect.h" #using

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups