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.

Messages - TheCommunistDuck

Pages: [1]
General / Lnk1120 Dynamic and static linking
« on: July 28, 2010, 05:17:15 pm »
Sorry, that's a post typo. I have linked to sfml-window-d.lib, just forgot to type that. Whoops.

I've linked to sfml-main-d.lib as well, and added -s for static, and it's fine. However I still can't dynamically link.

General / Lnk1120 Dynamic and static linking
« on: July 28, 2010, 02:02:40 pm »

Had several link issues, mainly since I was linking sfml-main-d.lib not sfml-system-d.lib. :roll:
However, this program does not link:
Code: [Select]

int main()
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
    sf::Clock timer;
    // Start main loop
    bool Running = true;
    while (Running)

    return EXIT_SUCCESS;

And link errors:
Code: [Select]

error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (__imp_??0Window@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z) referenced in function _main

I link to sfml-graphics-d.lib sfml-system-d.lib, and define SFML_DYNAMIC.
DLLs are in my obj folder, my bin folder, and my src folder.

I think it's not the DLLs, since removing them gets no change.


Graphics / Drawing just an sf::Image?
« on: March 26, 2010, 10:14:43 pm »
Wouldn't that consume a lot of memory, doing it 60 times a second though?

Graphics / Drawing just an sf::Image?
« on: March 26, 2010, 09:51:38 pm »

sf::Image doesn't actually derive from sf::Drawable, so how would you draw one to the screen?
I ask because my current project requires me to edit pixels in an sf::Image and then draw it to the screen. I've tried plugging it into an sf::Sprite and then GetImage(), but that returns a const sf::Image which I can't modify. Any ideas anyone, for either way?

Thanks. :D

General discussions / openGL
« on: January 02, 2010, 05:30:01 pm »
Are you running SFML2? I believe that's the only one with OGL3.x support.

I'm not sure if it's related, but with glGetIntegerv() said that  my context is OpenGL version 3.0.
Either mine's running behind, SFML2 only has support for 3.0 and not 3.2, or something else.

Window / Inheriting or composing with sf::Window?
« on: January 02, 2010, 12:30:08 pm »
I was trying to solve it, and copied the 4.lib files to the MinGW lib/ directory. It now works fine.

-Mark. :D

Window / Inheriting or composing with sf::Window?
« on: January 01, 2010, 10:39:25 pm »
Hey. I thought it was probably better to separate this from the other topic, seeing as they aren't really related.

I'm trying to make a window for OpenGL, by extending sf::Window (Attach a game loop, and things). However, if I try to do something like this:
Code: [Select]
class GLWindow : public sf::Window
//blah blah blah

I get linker errors from sfml-window-s.lib, almost all of functions I'm not using:
Code: [Select]
E:\CodeBlocks\...\libsfml-window-s.a(Joystick.o):Joystick.cpp:(.text+0x45)||undefined reference to `_joyGetPosEx@8'|
E:\CodeBlocks\...\libsfml-window-s.a(Joystick.o):Joystick.cpp:(.text+0x78)||undefined reference to `_joyGetPosEx@8'|
||=== Build finished: 30 errors, 0 warnings ===|
// The /.../ is my omittings.

However, if I remove the inheritance from sf::Window, it disappears.
sf::Window does inherit itself from NonCopyable, but I think that only stops foo = nonCopyableBar.

I also have the same problem with composition, if GLWindow has an object of sf::Window.

I think all the libraries are linked fine, but that's the only reason I can think why it isn't working.
It could also be something to do with SFML2, but I think somebody would've picked up on it.


General / Static Linking Errors
« on: January 01, 2010, 07:25:00 pm »
Ah. I forgot C::B keeps settings; I had that defined. :P

All works fine, or appears to. Thanks. :D

General / Static Linking Errors
« on: January 01, 2010, 06:57:24 pm »
I'm trying to statically link the sfml-window and sfml-system libraries to use the OpenGL window stuff. I've got SFML2 for the GL3.x support, but the tutorial code gives me linker errors. I have copied sfml-window-s/-s-d and sfml-system-s/-s-d to C::B lib directory. I have also put
Code: [Select]
-lsfml-window-s -lsfml-system-s
For release.
Code: [Select]
#include <SFML/System.hpp>
#include <iostream>

int main(int argc, char* argv[])
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
        std::cout << Clock.GetElapsedTime() << std::endl;

    return 0;

I get:
Code: [Select]
obj\Release\main.o:main.cpp:(.text+0x21)||undefined reference to `__imp___ZN2sf5ClockC1Ev'|
obj\Release\main.o:main.cpp:(.text+0x2c)||undefined reference to `__imp___ZNK2sf5Clock14GetElapsedTimeEv'|
obj\Release\main.o:main.cpp:(.text+0x52)||undefined reference to `__imp___ZN2sf5SleepEf'|
obj\Release\main.o:main.cpp:(.text+0x5b)||undefined reference to `__imp___ZNK2sf5Clock14GetElapsedTimeEv'|
||=== Build finished: 4 errors, 0 warnings ===|

Any ideas? I recently did a small test with sfml, a few weeks back, with the DLL libs and it worked fine. However I'd much prefer to lnik with static. Thanks. :D

General discussions / Build From Source For 2010
« on: December 21, 2009, 03:22:13 pm »
I managed to solve it, but I'm afraid I don't know what I did. :/
I have the 2010 builds, but the static libraries don't work.

General discussions / Build From Source For 2010
« on: December 18, 2009, 07:16:25 pm »
Hey all.

I found SFML after I got annoyed with SDL for numerous reasons. Mostly due to the C-ness of it, and I like my stuff to be more OO. :P
I must say, from what I've seen, it looks to be very good, and performs well on benchmarks.
Especially things such as the Sprite class, which I find cut out a lot of the generic things like moving and setting images.

I'm trying to use it with VS2010 B2, mainly because it's generally a nice API (if a little bloated). Building from the 08VS source, I've found that only 6 of the 16 projects actually compile for me. The others get linker errors:
Code: [Select]
error LNK1181: cannot open input file '...\SFML-1.5-sdk-windows-vc2008\SFML-1.5\Temp\vc2008\sfml-system\Release static\sfml-system.lib'

I think, due to my general lack of technical knowledge of how stuff actually compiles, that the *.lib files are temporary, and the *.a are the permament (static) ones?
Does anyone know how to solve this?

Much thanks. :)

P.S. I think that's all I need to provide, ask if any more's needed.
P.P.S I look forward to coming here often. ;)

EDIT: Changed settings to Debug/DLL, and now up to 11 successful.
However, I now get 5 linker 1104 errors:
error LNK1104: cannot open file '...\SFML-1.5-sdk-windows-vc2008\SFML-1.5\build\vc2008\..\..\Temp\vc2008\sfml-main\Debug\sfml-main.lib'   

I'm not overly sure why, still...

Pages: [1]