SRL Archive - C/C++ Help and Tutorials

Scar++ Linking help


rogue poser

2009-05-29 20:31:36

LINKING PROBLEM
im running vista and using devc++

#ifdef WINDOWS does not work on my machine for some odd reason, and it must be

"#ifdef WIN32"

im not quite sure why it does that but ill look into it, now that means all the definitions in the library are not working for me…
here is an example

#ifndef _OS_H_
#define _OS_H_

#ifdef WINDOWS
#include <windows.h>
#define IMAGE HBITMAP

#else

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/keysymdef.h>
#include <X11/extensions/XTest.h>
#include <unistd.h>
#include <dlfcn.h>
#include <stdlib.h>

the previous code produces the else portion of the definition if the WINDOWS handle is not changed to WIN32… is there a fix other than changing all the def handles?

is this a known issure with vista?

im gonna try to run it with an xp vm, will get back on this one

ShowerThoughts

2009-05-29 21:17:32

Scar++? You mean C++?

rogue poser

2009-05-29 21:24:14

From: Hermen
Scar++? You mean C++?


no linking scar++ with my c++ compiler

ShowerThoughts

2009-05-29 21:33:06

Hmm, it's a long time ago someone did that. You can ask Wizzup?

rogue poser

2009-05-29 21:41:01

ill just wait for a reply and occasionally bump the thread… im installing virtualbox on fedora 10 atm, gonna try a winxp link and see if its a vista thing, because i loathe vista and it often is…

currently hitting some snags with the vbox on fedora….

ShowerThoughts

2009-05-29 22:51:11

Might explain what you're trying to do?
Are you trying to use an C++ .dll in scar that is possible.

rogue poser

2009-05-29 23:02:32

From: Hermen
Might explain what you're trying to do?
Are you trying to use an C++ .dll in scar that is possible.


boberman is working on developing a SDK for c++ called scar++ that will do the same thing that scar does. He has many calls done and i was going to install it and play with it. i must be linking something wrong, or the windows handle needs to be win32, ill go throught the entire thing and change it all to win32 and see what happens… yay… will post soon

ShowerThoughts

2009-05-29 23:03:27

Wasn't he doing that years ago?
Did you talk to him recently?

rogue poser

2009-05-29 23:34:57

From: Hermen
Wasn't he doing that years ago?
Did you talk to him recently?


he updated the page early last month and said development is slow….

i noticed that none of the "ifdef WINDOWS" handles were returning true so i converted all of them to win32 and now it compiles, but the problem now is when i call the setup srl…. well…. it freaks out and closes… anyone who has this running, any help would be appreciated

rogue poser

2009-05-30 00:24:49

FIX'D!!!

all of the definition that were windows needed to be WIN32 and i needed to find some dll off the net, but now its legit, didnt modify any code other than the WINDOWS to WIN32 handles

if anyone needs help with this i finially got it working

ShowerThoughts

2009-05-30 01:21:27

They should sort all the stuff together, because I have seriously NO idea where you are talking about?

NiCbaZ

2009-05-30 03:55:12

From: Hermen
They should sort all the stuff together, because I have seriously NO idea where you are talking about?


Bob, and a few others are making a SCAR ++ a C++ version of scar, aka all its function. He is still updating this slowly.

Wizzup?

2009-05-31 00:12:23

From: Hermen
They should sort all the stuff together, because I have seriously NO idea where you are talking about?


Sorry, but then stop posting in this thread. Your posts didn't really add anything.


What version of MinGW are you using?

Bobarkinator

2009-05-31 02:37:47

The development is very slow. Boberman hasn't updated it in a while and I haven't even looked at it for more than a while. Maybe I'll take a look at it again.

rogue poser

2009-05-31 06:38:53

From: Wizzup?
Sorry, but then stop posting in this thread. Your posts didn't really add anything.


What version of MinGW are you using?


Oooh i fixed it thanks, im using devc++ 4.9.9.2 (newest) with whatever ming compiler it came with. I needed to change all of the "ifdef WINDOWS" handles to "ifdef WIN32" and then get the DLL's… (DLL's should be added to the repository)

Wizzup?

2009-05-31 12:46:44

From: rogue poser
Oooh i fixed it thanks, im using devc++ 4.9.9.2 (newest) with whatever ming compiler it came with. I needed to change all of the "ifdef WINDOWS" handles to "ifdef WIN32" and then get the DLL's… (DLL's should be added to the repository)


IMO, A repository should never contain the compiled files, only the source files… :) (Except perhaps for some libs (.dll/so) used by the source code)

boberman

2009-05-31 23:17:57

I didn't know that mingw had a Win32 macro already defined.

Really, what you needed to do is add the line "-DWINDOWS" to the command line of dev-C++ (I'm somewhat surprised you got it to work to be honest :)) that would have been under options somewhere (The dev-c++ project file apperently hasn't been updated recently)

As for srl… It doesn't exist for scar++. You are welcome to start porting it if you like, however, you should know that some scar functions are still missing making a complete port impossible.

rogue poser

2009-06-03 22:18:21

From: boberman
I didn't know that mingw had a Win32 macro already defined.

Really, what you needed to do is add the line "-DWINDOWS" to the command line of dev-C++ (I'm somewhat surprised you got it to work to be honest :)) that would have been under options somewhere (The dev-c++ project file apperently hasn't been updated recently)

As for srl… It doesn't exist for scar++. You are welcome to start porting it if you like, however, you should know that some scar functions are still missing making a complete port impossible.


lol i may not be as good as you, but im in my 3rd year going for a computer engineering degree at UCF :-)

I have to say im very impressed with the speed of your colorfinding procedure, mine takes much longer. You think you could put a small example of it in one function so i dont need to jump all over your library to figure out what you did? lol


edit: found it you use Bitblt and GetDIBits very nice, im still not 100% sure how that works, needs to find a good tut with definitions of whats going on

boberman

2009-06-05 03:46:57

:) the basics behind it is that instead of getting one pixel at a time (and having to communicate with windows every time) you just get a giant array of pixels all at once and search that.

It is much quicker then the alternative. DTM finding and colorfinding in general sees some pretty big speed boosts as a result of it.

HyperSecret

2009-06-05 18:18:48

From: rogue poser
lol i may not be as good as you, but im in my 3rd year going for a computer engineering degree at UCF :-)


University of California, Fresno?

I originally posted University of California, Fullerton but Fullerton is a CSU not a UC…

rogue poser

2009-06-06 06:35:02

From: HyperSecret
University of California, Fresno?

I originally posted University of California, Fullerton but Fullerton is a CSU not a UC…


university of central florida :-D some of my friends go to cal poly though?

From: Wizzup?
IMO, A repository should never contain the compiled files, only the source files… :) (Except perhaps for some libs (.dll/so) used by the source code)

one of the dlls wasnt compiled, i had to download it off the net, i think it was zlib1, not sure thought im on my linux partition right now and am currently in the middle of doing something, so ill check its exact name later