free

News

collapse

User Info

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

* Recent Posts

NOTICE OF PARKING ENFORCEMENT CHANGES by Huntsman
[June 19, 2025, 05:22:50 pm]


Re: Stopping by by Sinister
[June 08, 2025, 01:58:04 pm]


Re: Stopping by by Ehks
[June 04, 2025, 12:25:17 am]


Re: Rest in peace by Stefanrsb
[June 02, 2025, 03:38:02 am]


Re: [SA:MP]House of Sforza | The Elite Power | Estd. 2006 | LS - LV by Stefanrsb
[June 02, 2025, 03:09:22 am]


Re: The Soprano Family | Royal Loyalty by Stefanrsb
[June 02, 2025, 03:00:31 am]


Re: The Gvardia Family || San Fierro's Main Power || Best criminal group of 09/10/11 by Stefanrsb
[June 02, 2025, 02:47:01 am]


Re: BALLAS | In memory of INFERNO 9 and NBA by Stefanrsb
[June 02, 2025, 02:31:29 am]


Re: Count to 1,000,000. by Stefanrsb
[June 02, 2025, 02:15:04 am]


Re: Stopping by by Traser
[June 01, 2025, 10:23:13 pm]


Re: Stopping by by Old Catzu
[May 18, 2025, 07:27:06 pm]


Re: Stopping by by TheRock
[May 18, 2025, 06:44:49 am]

* Who's Online

  • Dot Guests: 386
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Birthday Calender

July 2025
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5
6 7 8 9 10 11 12
13 [14] 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

gcc & -fPIC issues

Teddy · 820

0 Members and 1 Guest are viewing this topic.

Offline TeddyTopic starter

  • Orc
  • *****
    • Posts: 9161
  • "I'm on top of the world because of you."
  • With us since: 05/02/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
on: September 26, 2014, 01:09:48 am
Hello,

I appear to be a bit stuck so I'll go out on a limb here and reach out to the community for some assistance. I have a C file which has the following includes:
Code: [Select]
#include "SQFuncs.h"
#include <stdio.h>
#include <stdlib.h>

Because of the last stdlib.h header which is shared library available on all major platforms and importantly adds the int system(..) function which is the purpose of the module.

The issue I am running into is the shared library doesn't get utilized properly on Linux and causes the server to error. While on Windows the code complies and executes efficiently.

I have the following Makefile used to build the .so file for Linux.
Code: [Select]
SDK_objs = SQMain.o SQFuncs.o

CXX = gcc -fPIC -g
CXXFLAGS = -O2 -DNDEBUG -I.

all: lu_exec.so

default: all

lu_exec.so: $(SDK_objs)
$(CXX) -o $@ $(SDK_objs) -shared -s

SQMain.o: SQMain.c SQMain.h SQFuncs.h
$(CXX) $(CXXFLAGS) -c SQMain.c -o $@

SQFuncs.o: SQFuncs.c SQFuncs.h
$(CXX) $(CXXFLAGS) -c SQFuncs.c -o $@

clean:
rm -f $(SDK_objs)

There error the server throws is a generic error which holds no use.

Any advice or support is appreciated.



Offline SugarD

  • Hero
  • ****
    • Posts: 11515
    With us since: 21/03/2008
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #1 on: October 23, 2014, 11:24:49 am
Did you ever get this resolved?



Offline TeddyTopic starter

  • Orc
  • *****
    • Posts: 9161
  • "I'm on top of the world because of you."
  • With us since: 05/02/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #2 on: October 23, 2014, 08:48:08 pm
You have access to the LU git... DOES IT LOOK RESOLVED?



Offline SugarD

  • Hero
  • ****
    • Posts: 11515
    With us since: 21/03/2008
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #3 on: October 24, 2014, 04:31:41 pm
You have access to the LU git... DOES IT LOOK RESOLVED?
Well considering it doesn't say anything about where, NO.



 


free
SimplePortal 2.3.7 © 2008-2025, SimplePortal