COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 09-13-2017, 12:50 AM   #1
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 127
Default Calling variable from inl to cpp

I'm trying to call my variable (double) from inl file to cpp file.But i can't...

"inl" files are combination of .h and .cpp files but i can figure it out...

Any idea?

Thanks.
Tunca is offline   Reply With Quote
Old 09-13-2017, 02:12 AM   #2
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 127
Default

I'm calling my variable with "extern".

Trying to call my gain reduction from .inl file to main.cpp.

In .inl file;

Code:
extern double GaRe;
And then i'm writing "GaRe" to where i want...

But getting error like this;

Code:
Undefined symbols for architecture i386:
  "_GaRe", referenced from:
Tunca is offline   Reply With Quote
Old 09-13-2017, 03:08 PM   #3
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 566
Default

What is your function returning? It should be returning the gain reduction value.
__________________
http://www.bozdigitallabs.com
bozmillar is offline   Reply With Quote
Old 09-13-2017, 05:15 PM   #4
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,603
Default

Quote:
Originally Posted by Tunca View Post
inl file to cpp file
I've worked with C++ for about 10 years and never had the need to use .inl files so far...Are you sure really need those?
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 09-14-2017, 12:40 AM   #5
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 127
Default

Quote:
Originally Posted by Xenakios View Post
I've worked with C++ for about 10 years and never had the need to use .inl files so far...Are you sure really need those?
I converted inl to h.Now i can call it.

Thanks.
Tunca is offline   Reply With Quote
Old 09-18-2017, 03:22 PM   #6
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 236
Default

Quote:
Originally Posted by Tunca View Post
"inl" files are combination of .h and .cpp files but i can figure it out...
Ah, wondered why I'd never heard of it—apparently a Microsoft thing...

I could be wrong, but my quick take: Actually, it's not a combination of .h and .cpp in a single file, but a place to put inlines (keep .h from being polluted with inlines).

As such, assuming the .inl is used as intended, I'd expect you can just move it to a .h file. I suppose it's not being used as intended, though. However, .h and .cpp are just files, too. You can put everything in a .h or .cpp if you want. It will be awkward if you have to share interfaces, though, so we usually put interfaces in the .h and implementations in .cpp—and Microsoft apparently decided we needed another for the inline stuff.
earlevel is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:56 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.