Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - conorjh

Pages: [1]
1
General / Anyone have VS2010 SFML templates?
« on: July 29, 2014, 01:40:57 pm »
SFML has recently become a major ball ache, and after much time spent fiddling with compiler settings and following tutorials Im still no further than when I started. In an effort to bypass any of the errors I could be making myself, does anyone have blank project with SFML already linked. Id just like to check the settings used in it. Iv found one for VS2013, and may just consider moving to that compiler now if it makes life easier, but before I do, does anyone have a link etc?

2
Window / RenderWindow::getSize() access violation
« on: July 27, 2014, 04:07:16 pm »
I get an access violation when trying to get the size of a window. Oddly, I can do most of the other members I tried, like getPosition() or display(). Can provide more code if needed. Can anyone notice anything on first browse?

Code: [Select]
kRenderContext* kit::gfx::create(int _x, int _y, int _z)
{
//attempt to create a window with the given resolution
klog.print("Attempting to create window...",ll_debug);
kRenderContext* out = new kRenderContext();
out->window = new sf::RenderWindow();
out->window->create(sf::VideoMode(_x,_y,_z), kitAppTitle, sf::Style::Default);

if(!out->window->isOpen())
{
//failed
klog.print("Failed to create window",ll_debug);
return NULL;
}

//add to our list of contexts
out->x = out->window->getSize().x; <----------------------------error here
out->y = out->window->getSize().y;
out->z = _z;

out->id = util::randomNumU();
contextBank.insert( std::make_pair( out->id,out ) );

klog.print("Window created successfully",ll_debug);
return out;
}

3
General / Dependency Heck
« on: July 16, 2014, 09:17:24 pm »
So Im building 3 projects currently...

WrapperLib
1st is almost a wrapper around SFML, and obviously includes SFML static libs. This builds as a library and currently is fine.

RPGLib
2nd is a set of RPG related functions and structures that includes the WrapperLib, and to get it building also includes the relevant SFML libs. Im not sure if that last part is the norm, and ideally Id like anyone using this lib to not have to be aware of SFML, as surely the relevant SFML code has been compiled into WrapperLib, but thats by the by as RPGLib also builds fine. Also, as the name suggests, this too is a library

Game
This is an exe that uses the first 2 libraries (RPG and Wrapper), and where the problem lies. I cant get this to build, and the errors are normally something like multiply defined symbols or unresolved external symbols relating to non SFML symbols


I guess the question is what compiler settings do I need to ensure down the line to get the game compiling? If I build my current solution containing all 3, the Game.exe gives me something along the lines of


3>kitlib.lib(jmemnobs.obj) : error LNK2001: unresolved external symbol _free
3>kitlib.lib(jdatadst.obj) : error LNK2001: unresolved external symbol _malloc
3>kitlib.lib(jmemnobs.obj) : error LNK2001: unresolved external symbol _malloc
3>kitlib.lib(jdatadst.obj) : error LNK2001: unresolved external symbol _ferror
3>kitlib.lib(jdatadst.obj) : error LNK2001: unresolved external symbol _fflush
3>kitlib.lib(jerror.obj) : error LNK2001: unresolved external symbol _exit
3>kitlib.lib(jerror.obj) : error LNK2001: unresolved external symbol _fprintf
3>kitlib.lib(jerror.obj) : error LNK2001: unresolved external symbol ___iob_func
3>kitlib.lib(jerror.obj) : error LNK2001: unresolved external symbol _sprintf
3>kitlib.lib(jmemmgr.obj) : error LNK2001: unresolved external symbol _sscanf
3>kitlib.lib(jmemmgr.obj) : error LNK2001: unresolved external symbol _getenv
3>topdown.lib(sys.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Xinvalid_argument(char const *)" (__imp_?_Xinvalid_argument@std@@YAXPBD@Z)
3>topdown.lib(entity.obj) : error LNK2001: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z)
3>topdown.lib(entity.obj) : error LNK2001: unresolved external symbol "void __stdcall `eh vector constructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *),void (__thiscall*)(void *))" (??_L@YGXPAXIHP6EX0@Z1@Z)
3>C:\Users\Bobo\Documents\Visual Studio 2010\Projects\farmer\Release\farmer.exe : fatal error LNK1120: 188 unresolved externals

Just on a brief perusal, does anyone know the solution to this? Or at least things to check for?

Thanks,

Pages: [1]
anything