OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

When writing my own software and integrating openscenegraph, LNK error is thrown out.


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build]
View previous topic :: View next topic  
Author Message
diwasbhattarai
Newbie


Joined: 22 Mar 2016
Posts: 5

PostPosted: Tue Mar 22, 2016 1:08 pm    Post subject:
When writing my own software and integrating openscenegraph, LNK error is thrown out.
Reply with quote

Hi,
I will explain what I did till now:

1. Donwloaded OSG and extracted on the folder OSGraph/OpenSceneGraph-3.4.0.
2. Downloaded 3rdParty folder 64bit and extracted on the folder OSGraph/3rdParty.
3.Installed Cmake and Browed to OSGraph/OpenSceneGraph-3.4.0 folder on "Where is the source code".
4. On the option "Where to build the binaries" -> OSGraph/OpenSceneGraph-3.4.0/build.
5. CMAKE_INSTALL_PREFIX ->OSGraph/osg
6. Clicked on Configure -> "Visual Studio 12 2013 Win64" and then Generate.
7. Opened OSGraph/OpenSceneGraph-3.4.0/build/OpenSceneGraph.sln, Release mode-> and right click on "ALL_BUILD" and clicked Build.
8. After an hour the built is finished and again right click on "INSTALL" and clicked Build. Now I get three folders on OSGraph/osg namely bin, include and lib.(I suppose these are the files that I need to include on my project).
9. Created new Visual Studio-Project
- Win32 Console Application
- Empty project
10. Release Mode and then I set the Project-Properties as follows:
- General -> Character Set -> Use Multi-Byte Character Set
- C/C++ -> General -> Additional Include Directories -> "OSGraph/osg/include”
- C/C++ -> Code Generation -> Runtime Library -> Multi-threaded Debug DLL (/MDd)
- C/C++ -> Language -> Enable Run-Time Type Info -> Yes (/GR)
- Linker -> General -> Additional Library Directories -> "OSGraph/osg/lib“
- Linker -> Input -> Additional Dependencies -> "osg.lib, osgAnimation.lib, osgDB.lib, osgFX.lib, osgGA.lib, osgManipulator.lib, osgParticle.lib, osgPresentation.lib, osgShadow.lib, osgSim.lib, osgTerrain.lib, osgText.lib, osgUI.lib, osgUtil.lib, osgViewer.lib, osgVolume.lib, osgWidget.lib, OpenThreads.lib“
11.Now I try to built then I get more than 300 LNK error: ie LNK2028, LNK2019, LNK1120.


Can Anybody tell me what I am doing wrong?


Thank you!

Cheers,
Diwas
Back to top
View user's profile Send private message
SMesserschmidt (Sebastian Messerschmidt)
Forum Moderator


Joined: 10 Sep 2013
Posts: 796

PostPosted: Tue Mar 22, 2016 2:40 pm    Post subject:
When writing my own software and integrating openscenegraph, LNK error is thrown out.
Reply with quote

Hi Diwas,

Can you be a bit more specific on the Linker error you are getting?
It is hard to guess what might be missing without some output and maybe
some minimal code.
The only thing I'm spotting is the /MDd. Have you tried /MD instead?

Cheers
Sebastian


Quote:
Hi,
I will explain what I did till now:

1. Donwloaded OSG and extracted on the folder OSGraph/OpenSceneGraph-3.4.0.
2. Downloaded 3rdParty folder 64bit and extracted on the folder OSGraph/3rdParty.
3.Installed Cmake and Browed to OSGraph/OpenSceneGraph-3.4.0 folder on "Where is the source code".
4. On the option "Where to build the binaries" -> OSGraph/OpenSceneGraph-3.4.0/build.
5. CMAKE_INSTALL_PREFIX ->OSGraph/osg
6. Clicked on Configure -> "Visual Studio 12 2013 Win64" and then Generate.
7. Opened OSGraph/OpenSceneGraph-3.4.0/build/OpenSceneGraph.sln, Release mode-> and right click on "ALL_BUILD" and clicked Build.
8. After an hour the built is finished and again right click on "INSTALL" and clicked Build. Now I get three folders on OSGraph/osg namely bin, include and lib.(I suppose these are the files that I need to include on my project).
9. Created new Visual Studio-Project
- Win32 Console Application
- Empty project
10. Release Mode and then I set the Project-Properties as follows:
- General -> Character Set -> Use Multi-Byte Character Set
- C/C++ -> General -> Additional Include Directories -> "OSGraph/osg/include”
- C/C++ -> Code Generation -> Runtime Library -> Multi-threaded Debug DLL (/MDd)
- C/C++ -> Language -> Enable Run-Time Type Info -> Yes (/GR)
- Linker -> General -> Additional Library Directories -> "OSGraph/osg/lib“
- Linker -> Input -> Additional Dependencies -> "osg.lib, osgAnimation.lib, osgDB.lib, osgFX.lib, osgGA.lib, osgManipulator.lib, osgParticle.lib, osgPresentation.lib, osgShadow.lib, osgSim.lib, osgTerrain.lib, osgText.lib, osgUI.lib, osgUtil.lib, osgViewer.lib, osgVolume.lib, osgWidget.lib, OpenThreads.lib“
11.Now I try to built then I get more than 300 LNK error: ie LNK2028, LNK2019, LNK1120.


Can Anybody tell me what I am doing wrong?


Thank you!

Cheers,
Diwas

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66586#66586









------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
diwasbhattarai
Newbie


Joined: 22 Mar 2016
Posts: 5

PostPosted: Tue Mar 22, 2016 4:09 pm    Post subject:
Reply with quote

Hi Sebastian,
thanks for replying so fast.
Here is the link to the Errors that I get. http://pastebin.com/0Z6Zk553

Following is the code that I compile.
Code:
#include <iostream>
#include<iostream>
#include<osg/Group>
#include<osg/Node>
#include<osgDB/ReadFile>
#include<osgViewer/Viewer>
#include<osgGA/TrackballManipulator>

int
main()
{
   //create a viewer
   osgViewer::Viewer viewer;
   viewer.setCameraManipulator(
      new
      osgGA::TrackballManipulator());
   // Load a model
   osg::Node* modelNode = osgDB::readNodeFile("cow.osg");
   if
      (!modelNode)
   {
      std::cout <<" could not find model "<< std::endl;
      return   0;
   }
   osg::Group* root =   new   osg::Group();
   root->addChild(modelNode);
   viewer.setSceneData(root);
   while
      (!viewer.done())
   {
      viewer.frame();
   }
}


I tried /MD also but same problem.

Thank you!

Cheers,
Diwas
Back to top
View user's profile Send private message
Voerman, L.
Guest





PostPosted: Wed Mar 23, 2016 8:29 am    Post subject:
When writing my own software and integrating openscenegraph, LNK error is thrown out.
Reply with quote

Hi Diwas,as you don't mention it I think you did not create a x64 configuration for your project, the default new project is a 32 bit project.
In visual studio in below the menus is a bar with two drop down lists, one with "Release" and one with "Win32", below the Win32 is an option called "Configuration manager" hiding the option to generate a x64 version of your project.
Regards, Laurens.


On Tue, Mar 22, 2016 at 5:09 PM, Diwas Bhattarai < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi,

Here is the link to the Errors that I get. http:// pastebin. com /0Z6Zk553

Following is the code that I compile.

Code:





#include
#include
#include
#include
#include
#include
#include

int
main()
{
   //create a viewer
   osgViewer::Viewer viewer;
   viewer.setCameraManipulator(
      new
      osgGA::TrackballManipulator());
   // Load a model
   osg::Node* modelNode = osgDB::readNodeFile("cow.osg");
   if
      (!modelNode)
   {
      std::cout <<" could not find model "<< std::endl;
      return   0;
   }
   osg::Group* root =   new   osg::Group();
   root->addChild(modelNode);
   viewer.setSceneData(root);
   while
      (!viewer.done())
   {
      viewer.frame();
   }
}




I tried /MD also but same problem.

Thank you!

Cheers,
Diwas[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66594#66594




_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



------------------
Post generated by Mail2Forum
Back to top
diwasbhattarai
Newbie


Joined: 22 Mar 2016
Posts: 5

PostPosted: Wed Mar 23, 2016 4:07 pm    Post subject:
Reply with quote

Hi,

Thank you very much for the solution. That's it. It solved the problem.


Thank you!

Cheers,
Diwas
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts OpenSceneGraph-3.5.8 dev release tagged robertosfield General 0 Tue Nov 14, 2017 3:59 pm View latest post
No new posts Warning: Error in reading to jpg images romulogcerqueira General 4 Sat Nov 04, 2017 10:37 pm View latest post
No new posts New Defects reported by Coverity Scan... filnet General 0 Tue Oct 31, 2017 5:22 pm View latest post
No new posts OpenSceneGraph static linking for And... tanshihaj Build system [build] 1 Thu Sep 21, 2017 12:56 pm View latest post
No new posts OpenSceneGraph-3.4.1 released! robertosfield General 3 Mon Aug 28, 2017 5:39 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP